package com.example.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.pojo.tMesProQualityIndexPojo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface tMesProQualityIndexMapp {
    //在记录的表中查询到所有的表的表名称
    @DS("newMscLowCodeFormal")
    @Select("SELECT table_name FROM T_MES_PRO_QUALITY_INDEX ORDER BY creation_time ")
    List<tMesProQualityIndexPojo> queryTableName();


    //新建新表完成后，插入数据记录到索引的表中，用于后期更新和判断
    @DS("newMscLowCodeFormal")
    @Insert("insert into T_MES_PRO_QUALITY_INDEX (table_name, table_length, creation_time) values (#{table_name},#{table_length},#{creation_time})")
    void insertTableName(tMesProQualityIndexPojo indexPojoValue);

}


